function [s] = getState(x,y,z,x1,x2)

% x is (m by 1) x-coord. Similarly y. And z is (m by 1) zoom (1 or
% 2)...these are groundTruth
% for now, the state is independent of y, ie depends only on x and z
% x1 is the x-boundary between the 1st and second board
% x2 is the x-boundary between the second and third board

m = size(x,1);
s = ones(m,1);

for i=1:m
    if(z(i)==1) %zoom out
        if(x(i) < x1)
            s(i,1) = 1; 
        elseif(x(i) > x2)
                s(i,1) = 5;
        else s(i,1) = 3;
        end
    else %z(i) == 2, ie zoom in
        if(x(i) < x1)
            s(i,1) = 2; 
        elseif(x(i) > x2)
                s(i,1) = 6;
        else s(i,1) = 4;
        end
    end
end

end
